<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript">
function winResize() {
	var Dwidth = parseInt(document.body.scrollWidth);
	var Dheight = parseInt(document.body.scrollHeight);
	var divEl = document.createElement("div");
	divEl.style.position = "absolute";
	divEl.style.left = "0px";
	divEl.style.top = "0px";
	divEl.style.width = "100%";
	divEl.style.height = "100%";

	document.body.appendChild(divEl);

	window.resizeBy(Dwidth - divEl.offsetWidth+30, Dheight- divEl.offsetHeight+20);
	document.body.removeChild(divEl);
}

</script>
<title>복무신청 리스트</title>
</head>
<body onload="winResize()">
	복무신청 리스트<hr>
	<input type="button" onclick="location.href='/${initParam.context_root}/typeOne.do'" value="신청하기"> 
	<table border="1" cellpadding="6px" width="800px">
		<tr bgcolor="lightgray">
			<th><b>번호</b></th>
			<th><b>신청자</b></th>
			<th><b>종별</b></th>
			<th><b>사용기간</b></th>
			<th><b>사용시간</b></th>
			<th><b>사유</b></th>
			<th><b>결재자</b></th>
		</tr>
		
		<c:forEach items="${selectServiceRequestList}" var="serviceRequest" varStatus="i">
			<tr>
				<td><a href="/${initParam.context_root }/typeOneView.do?requestNo=${serviceRequest.requestNo }" ><c:out value="${serviceRequest.requestNo }"/></a></td>
				<td><c:out value="${serviceRequest.name }"/></td>
				<td><c:out value="${serviceRequest.jongbyul }"/></td>
				<td>
					<fmt:formatDate var ="strStartDate" value="${serviceRequest.calendarStart }" type="date" pattern="yyyy-MM-dd"/>
					<fmt:formatDate var ="strEndDate" value="${serviceRequest.calendarEnd }" type="date" pattern="yyyy-MM-dd"/>
					<c:out value="${strStartDate} ~ ${strEndDate }"/>
				</td>
				<td><c:out value="${serviceRequest.timeStart } ~ ${serviceRequest.timeEnd }"/></td>
				<td><c:out value="${serviceRequest.sau }"/></td>
				<td><c:out value="${serviceRequest.approName }"/></td>
			</tr>
		</c:forEach>
	</table>
</body>
</html>